import * as React from 'react';
import './style.less'

export const withWrapper = (WrappedComponent: any) => {
    return class extends React.Component {
        public props: {
            datas?: Table.Data[];
            pager?: Common.Pager;
            className?: string;
            onPageChange?(pager: Common.Pager): void;
            onSelectUser?(record: any): any;
        }

        public render() {
            return (
                <div className={`basic-table ${this.props.className?this.props.className:''}`}>
                    <WrappedComponent {...this.props}/>
                </div>
            )
        }
    }
}

